home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
powerb5.zip
/
P5MSC008.TIP
< prev
next >
Wrap
Text File
|
1993-06-01
|
2KB
|
39 lines
Here's a way to avoid invoking Windows 3.0 again from within
a Windows DOS session. First, rename C:\WINDOWS\WIN.COM to
WINDOWS.COM. Then copy the batch file called WIN.BAT [it's
in the P5MSC directory on your PowerBase *.* Volume 5
diskette -Ed.] in your WINDOWS directory. (If your WINDOWS
directory isn't C:\WINDOWS, you'll need to alter the batch
file appropriately.) Typing WIN at the DOS prompt will
thereafter call the batch file instead of loading Windows
directly. The batch file works by looking for a swap file,
WIN?86.SWP (it's WIN386.SWP in 386-enhanced mode and
WIN286.SWP in standard mode), that's present only when
Windows is running. If you run WIN when Windows isn't
running, WIN.BAT starts it for you via WINDOWS.COM. But if
you run it in a Windows DOS session, the batch file will
execute an EXIT command and return you to the desktop.
Walter J. Orlik
Delray Beach, Florida
Editor's Note: This batch file is a good way to keep from
invoking Windows 3.0 twice (Windows 3.1 won't let you
accidentally load it inside itself) -- IF you use a
temporary swap file. (If you use Windows without a swap
file, or with a permanent swap file, this batch won't work.)
Our December 1991 column featured a solution to this problem
that works regardless of whether or how Windows is doing
swapping: INWINEQ1, which returns an ERRORLEVEL of 1 when
Windows is running. Both of these techniques can be used to
keep from turning Windows 3.0 into a memory-eating hall of
mirrors.
Title: Do Not Recurse Into Windows
Category: MSC
Issue Date: September, 1992
Editor: Brett Glass
Supplementary Files: P5MSC\WIN.BAT
Filename: P5MSC008.TIP